package com.yao2san.simdif.service;

import com.yao2san.simdif.entity.DatasourceConnectionAttr;


/**
 * @author wxg
 */
public class DatasourceConnectHelper {
    public final static ThreadLocal<DatasourceConnectionAttr> DATASOURCE_CONNECTION_ATTR = new ThreadLocal<>();

    public static void setConnectionAttr(DatasourceConnectionAttr attr) {
        DATASOURCE_CONNECTION_ATTR.set(attr);
    }

    public static DatasourceConnectionAttr getConnectionAttr() {
        return DATASOURCE_CONNECTION_ATTR.get();
    }

    public static void removeConnectionAttr() {
        DATASOURCE_CONNECTION_ATTR.remove();
    }
}
